import request from '../../util/axios'

// 获取顶部菜单树形结构
export const getMenuListTree = (data) => request({
  url: '/yuyi-user-boot/api/sys/sysMenu/menuTreeList',
  method: 'post',
  data
})

// 顶部菜单所分配的树
export const getMenuTree = (data) => request({
  url: '/yuyi-user-boot/api/sys/sysMenu/menuTopTreeKeys',
  method: 'post',
  data
})

// 分页查询菜单项列表
export const getMenuContainList = (pid, data) => request({
  url: `/yuyi-user-boot/api/sys/sysMenu/menuItem/pid/${pid}/paging`,
  method: 'post',
  data
})

// 新增菜单信息
export const addMenuInfo = (data) => request({
  url: '/yuyi-user-boot/api/sys/sysMenu',
  method: 'post',
  data
})

// 编辑菜单信息
export const editMenuInfo = (data) => request({
  url: '/yuyi-user-boot/api/sys/sysMenu',
  method: 'put',
  data
})

// 删除菜单信息
export const delMenuInfo = (data) => request({
  url: '/yuyi-user-boot/api/sys/sysMenu',
  method: 'delete',
  data
})

// 分页查询菜单块(设置菜单权限)
export const getMenuJurisdiction = (data) => request({
  url: '/yuyi-user-boot/api/sys/sysMenu/menuBlock/paging',
  method: 'post',
  data
})
